﻿@{
    ViewBag.Title = "组织架构";
}

@model Web.Models.TAStructureModel


<div id="main_content" style="margin-left: 0px;">

    <div class="main-wrapper-content">
        <div class="breadcrumb" style="margin-top: 71px;">
            <a href="javascript:;">首页</a> >
            <a href="javascript:;">组织架构</a>
        </div>

        <div class="clgxs-left fl" style="width: 30%; float: left;">
            <div class="clgxs-left-main">
                <div class="clgxs-left-caidan-body">
                    <div class="clgxs-left-banner" id="cdbox2">
                        <!--菜单开始-->
                        @foreach (var item in Model.LiTADictionariesM.Where(s => s.GroupCode == "FZF"))
                        {
                            <div class="clgxs-left-banner1 wid95 contentbox0" style="width: 100%;">
                                <!--一级-->
                                <ul class="clear">
                                    <li class="wid30 jm_wid30 teAlLe">
                                        <span class="open-icons btn-one close-icons"></span>
                                        <span class="jm_open-icons"></span>
                                        <b class="TreeLevel1">@item.Name</b>
                                    </li>
                                </ul>

                                @foreach (var item2 in Model.LiTADictionariesM.Where(s => s.GroupCode == "CPLX"))
                                {

                                    <!--二级-->
                                    <div class="clgxs-left-banner2 disNon" style="display: block;">
                                        <!--二级-->
                                        <ul class="clear">
                                            <li class="wid30 jm_wid30 teAlLe">
                                                <span class="open-icons openclose btn-two close-icons"></span>
                                                <span class="jm_btn_two"></span>
                                                <b class="TreeLevel2" shortname="E01">@item2.Name<span>(2/5)</span></b>
                                            </li>
                                        </ul>
                                        <div class="clgxs-left-banner3 disNon" style="display: none;">
                                            @foreach (var item3 in Model.LiTAStructureM.Where(s => s.ParentId == 0 & s.ProductId == item2.id & s.DutyType == item.id))
                                            {
                                            <!--三级-->
                                                <ul class="clear">
                                                    <li class="wid30 jm_wid30 teAlLe">
                                                        <span class="open-icons openclose btn-three close-icons"></span>
                                                        <span class="jm_btn_three"></span>
                                                        <b class="TreeLevel3">@item3.Name</b>
                                                    </li>
                                                </ul>

                                                foreach (var item4 in Model.LiTAStructureM.Where(s => s.ParentId == item3.id & s.ProductId == item2.id & s.DutyType == item.id))
                                                {
                                                    <div class="clgxs-left-banner4 disNon" style="display: none;">
                                                        <!--四级-->
                                                        <ul class="clear">
                                                            <li class="wid30 jm_wid30 teAlLe">
                                                                <span class="open-icons openclose btn-fore jm_btn_fore close-icons"></span>
                                                                <b class="TreeLevel4">@item4.Name</b>
                                                            </li>
                                                        </ul>
                                                        @foreach (var item5 in Model.LiTAStructureM.Where(s => s.ParentId == item4.id & s.ProductId == item2.id & s.DutyType == item.id))
                                                        {
                                                            <div class="clgxs-left-banner5 disNon" style="display: none;">
                                                                <!--五级-->
                                                                <ul class="clear">
                                                                    <li class="wid85 teAlLe">
                                                                        <span class="openclose add-icons5 btn-five" style="cursor:pointer;"></span>
                                                                        <b class="TreeLevel5">@item5.Name</b>
                                                                    </li>
                                                                </ul>
                                                            </div>
                                                        }
                                                    </div>
                                                }
                                            }

                                            <!--三级-->
                                            <ul class="clear">
                                                <li class="wid30 jm_wid30 teAlLe">
                                                    <span class="open-icons openclose btn-three close-icons"></span>
                                                    <span class="jm_btn_three"></span>
                                                    <b class="TreeLevel3">邱秋</b>
                                                </li>
                                            </ul>
                                            <div class="clgxs-left-banner4 disNon" style="display: none;">
                                                <!--四级-->
                                                <ul class="clear">
                                                    <li class="wid30 jm_wid30 teAlLe">
                                                        <span class="open-icons openclose btn-fore jm_btn_fore close-icons"></span>
                                                        <b class="TreeLevel4">张梦阳</b>
                                                    </li>
                                                </ul>
                                                <div class="clgxs-left-banner5 disNon" style="display: none;">
                                                    <!--五级-->
                                                    <ul class="clear">
                                                        <li class="wid85 teAlLe">
                                                            <span class="openclose add-icons5 btn-five" style="cursor:pointer;"></span>
                                                            <b class="TreeLevel5">缺岗</b>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                            <div class="clgxs-left-banner4 disNon" style="display: none;">
                                                <!--四级-->
                                                <ul class="clear">
                                                    <li class="wid30 jm_wid30 teAlLe">
                                                        <span class="open-icons openclose btn-fore jm_btn_fore close-icons"></span>
                                                        <b class="TreeLevel4">缺岗</b>
                                                    </li>
                                                </ul>
                                                <div class="clgxs-left-banner5 disNon" style="display: none;">
                                                    <!--五级-->
                                                    <ul class="clear">
                                                        <li class="wid85 teAlLe">
                                                            <span class="openclose add-icons5 btn-five" style="cursor:pointer;"></span>
                                                            <b class="TreeLevel5">缺岗</b>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                }
                            </div>
                        }

                    </div><!--整体菜单结束-->
                </div><!--出现滚动条出现的结束-->
            </div>
        </div>	<!--左边部分结束-->

        <div class="table-wrapper plr10" style="float: left; width: 65%; padding-top: 10px ; padding-bottom: 20px;">
            <table class="table jm_table2 ColorTable" width="100%">
                <thead>
                    <tr>
                        <th>部门</th>
                        <th>岗位</th>
                        <th>满编</th>
                        <th>在岗</th>
                        <th>缺岗</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td rowspan="4">研发</td>
                        <td>经理</td>
                        <td>7</td>
                        <td>6</td>
                        <td>2</td>
                    </tr>
                    <tr>
                        <td>主管</td>
                        <td>14</td>
                        <td>5</td>
                        <td>9</td>
                    </tr>
                    <tr>
                        <td>员工</td>
                        <td>25</td>
                        <td>12</td>
                        <td>13</td>
                    </tr>
                    <tr class="jm_table_hj">
                        <td>合计</td>
                        <td>46</td>
                        <td>22</td>
                        <td>24</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script src="~/Scripts/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
<!--点击圆圈效果-->
<script src="~/Scripts/jquery.rippleria.min.js" type="text/javascript" charset="utf-8"></script>
<!--模拟滚动条-->
<script src="~/Scripts/scroll.js" type="text/javascript" charset="utf-8"></script>
<!--主导航-->
<script src="~/Scripts/main.js" type="text/javascript" charset="utf-8"></script>
<script src="~/Scripts/rxued.js" type="text/javascript" charset="utf-8"></script>
<!--placeholder-->
<script src="~/Scripts/jquery.placeholder.1.3.min.js" type="text/javascript" charset="utf-8"></script>
<!--分页-->
<script src="~/Scripts/jquery.pagination.js" type="text/javascript" charset="utf-8"></script>
<script>
    $(function () {

        //////////////////////////  树    形     ///////////////////////////////////

        //计算滚动条的函数
        function mainScroll() {
            var winH = $(window).height();
            //右侧的高度
            $(".clgxs-left-caidan-body").css("height", winH - 33 - $(".clgxs-left-header").outerHeight(true) - $(".clgxs-left-title").outerHeight(true) + "px")
            //右侧的高度
            $(".clgxs-right").css("height", winH - 45 + "px")
            //左侧右侧宽度

            //jm   $(".clgxs-left-title ul").css("width", $(".clgxs-left-banner1").outerWidth() + "px")
        }

        //菜单显示
        //左侧一级菜单的控制
        $("#cdbox,#cdbox2").on("click", ".btn-one", function () {
            if ($(this).parents("ul").next(".clgxs-left-banner2").css("display") == "none") {
                $(".clgxs-left-banner1").find("div").css("display", "none")
                $(".clgxs-left-banner1").find(".openclose").removeClass("close-icons")
                $(this).parents("ul").nextAll(".clgxs-left-banner2").css("display", "block");
                $(this).addClass("close-icons")
            } else {
                $(this).parents("ul").parent().find("div").css("display", "none")
                $(this).removeClass("close-icons")
            }
        });


        //左侧二级菜单的控制
        $("#cdbox,#cdbox2").on("click", ".btn-two", function () {
            if ($(this).parents("ul").next(".clgxs-left-banner3").css("display") == "none") {
                $(".clgxs-left-banner2").find("div").css("display", "none")
                $(".clgxs-left-banner2").find(".openclose").removeClass("close-icons")
                $(this).parents("ul").nextAll(".clgxs-left-banner3").css("display", "block")
                $(this).addClass("close-icons")
            } else {
                $(this).parents("ul").parent().find("div").css("display", "none")
                $(this).removeClass("close-icons")
            }
        })

        //左侧三级菜单的控制
        $("#cdbox,#cdbox2").on("click", ".btn-three", function () {
            if ($(this).parents("ul").next(".clgxs-left-banner4").css("display") == "none") {
                $(".clgxs-left-banner3").find("div").css("display", "none")
                $(".clgxs-left-banner3").find(".openclose").removeClass("close-icons")
                $(this).parents("ul").nextAll(".clgxs-left-banner4").css("display", "block")
                $(this).addClass("close-icons")
            } else {
                $(this).parents("ul").parent().find("div").css("display", "none")
                $(this).removeClass("close-icons")
            }
        })
        //左侧四级菜单的控制
        $("#cdbox,#cdbox2").on("click", ".btn-fore", function () {
            if ($(this).parents("ul").next(".clgxs-left-banner5").css("display") == "none") {
                $(".clgxs-left-banner4").find("div").css("display", "none")
                $(".clgxs-left-banner4").find(".openclose").removeClass("close-icons")
                $(this).parents("ul").nextAll(".clgxs-left-banner5").css("display", "block")
                $(this).addClass("close-icons")
            } else {
                $(this).parents("ul").parent().find("div").css("display", "none")
                $(this).removeClass("close-icons")
            }
        })
    })
</script>



